package auctions;

/** Strategy used by a an agent participating in a Dutch auction.
 */
public interface DutchBuyerStrategy {
    
    /** Returns true is the agent is willing to continue to negociate for items
     * at the reference price under the specified conditions in a Dutch auction.
     * @param itemsTotal the total number of items available
     * @param itemsToBuy the number of items remaining to buy.
     * @param price the price for an item.
     * @param budget the maximum price that the agent is willing to pay to
     * buy the remaining objects.
     * @return true if the agent is still interested in this deal, false 
     * otherwhise.
     */
    public boolean checkOffer(int itemsTotal,int itemsToBuy, int price, 
                              int budget);


    /** Returns the number of items this agent is willing to buy at the 
     * specified price under the specified conditions in a Dutch auction.
     * @param itemsTotal the total number of items available
     * @param itemsToBuy the number of items remaining to buy.
     * @param price the price for an item.
     * @param budget the maximum price that the agent is willing to pay to
     * buy the remaining objects.
     * @return the number of items the agent is willing to buy.
     */
    public int itemsToBuy(int itemsTotal, int itemsToBuy, int price, 
                          int budget);
}
